<?php

/**
 * Created by PhpStorm.
 * User: yanshinian@yeah.net
 * Date: 2019/5/22
 * Time: 17:51.
 * pdd.ddk.goods.detail
 */
class DdkGoodsDetailRequest
{
    /**
     * @var STRING  渠道id
     */
    private $pid;
    /**
     * @var int  自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key
     */
    private $custom_parameters;
    /**
     * @var LONG[]  商品ID，仅支持单个查询。例如：[123456]
     */
    private $goods_id_list;
    /**
     * @var INTEGER  佣金优惠券对应推广类型，3：专属 4：招商
     */
    private $plan_type;
    /**
     * @var STRING  搜索id，建议填写，提高收益。来自pdd.ddk.goods.recommend.get、pdd.ddk.goods.search、pdd.ddk.top.goods.list.query等接口
     */
    private $search_id;
    /**
     * @var LONG  招商多多客ID
     */
    private $zs_duo_id;
    

    private $apiParas = array();

    public function setPid($pid)
    {
        $this->pid = $pid;
        $this->apiParas['pid'] = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }

    public function setCustomParameters($custom_parameters)
    {
        $this->custom_parameters = $custom_parameters;
        $this->apiParas['custom_parameters'] = $custom_parameters;
    }

    public function getCustomParameters()
    {
        return $this->custom_parameters;
    }

    public function setGoodsIdList($goods_id_list)
    {
        $this->goods_id_list = $goods_id_list;
        $this->apiParas['goods_id_list'] = $goods_id_list;
    }

    public function getGoodsIdList()
    {
        return $this->goods_id_list;
    }

    public function setPlanType($plan_type)
    {
        $this->plan_type = $plan_type;
        $this->apiParas['plan_type'] = $plan_type;
    }

    public function getPlanType()
    {
        return $this->plan_type;
    }

    public function setSearchId($search_id)
    {
        $this->search_id = $search_id;
        $this->apiParas['search_id'] = $search_id;
    }

    public function getSearchId()
    {
        return $this->search_id;
    }

    public function setZsDuoId($zs_duo_id)
    {
        $this->zs_duo_id = $zs_duo_id;
        $this->apiParas['zs_duo_id'] = $zs_duo_id;
    }

    public function getZsDuoId()
    {
        return $this->zs_duo_id;
    }


    public function getApiMethodName()
    {
        return 'pdd.ddk.goods.detail';
    }

    public function getApiParas()
    {
        return $this->apiParas;
    }

    public function check()
    {
        RequestCheckUtil::checkNotNull($this->pid,"pid");
        RequestCheckUtil::checkNotNull($this->goods_id_list,"goods_id_list");
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
